package net.yla.smartbus.module.ba.right.roles.form;

import lombok.Data;
import org.apache.commons.lang.StringUtils;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.List;

/**
 * @Date: 2020-9-23 15:17:39
 * @Author: Being Nobody
 * @Version: 1.0
 */
@Data
public class RoleForm {
    // 角色ID
    private Integer roleId;
    // 角色名称
    @NotBlank(message = "角色名称不能为空")
    private String roleName;
    // 是否继承
    private Integer inherits;
    // 备注
    private String remarks;

    // 成员数量
    private Byte[] members;
    private int[] members1;

    private Integer disabled;

    /**
     * 已选平台分类ids
     */
    private List<Integer> platformIds;

    /**
     * 已选菜单ids
     */
    private List<Integer> menuIds;

    public String getRoleName() {
        return StringUtils.isNotBlank(roleName) ? roleName.trim() : null;
    }

}
